package com.quyunshuo.module.home.room.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.quyunshuo.module.home.room.Converters
import com.quyunshuo.module.home.room.TagListConverter
import java.util.Date

// 待办事项主表
@Entity(tableName = "todos")
@TypeConverters(Converters::class,TagListConverter::class) // 添加这行
data class TodoEntity(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val title: String,
    val description: String? = null,
    val dueDate: Date? = null,
    val category: TodoCategory,
    val priority: PriorityLevel,
    val tags: List<String> = emptyList(),
    val createdAt: Date = Date(),
    val isCompleted: Boolean = false
)

// 分类枚举
enum class TodoCategory(val cValue: String) {
    WORK("工作"), PERSONAL("个人"), FAMILY("家庭"), HEALTH("健康"),  FINANCE("学习"), SHORT_BREAK("其他")
}

// 优先级枚举
enum class PriorityLevel(val level:String) {
    LOW("低"), MEDIUM("中"), HIGH("高")
}